package com.xxxy.Controller;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.alibaba.csp.sentinel.slots.block.BlockException;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class MonitorController {
    @GetMapping(value = "/monitor/hello")
    @SentinelResource(value = "helloResource", blockHandler = "helloBlockHandler",
                     blockHandlerClass = com.xxxy.Blockhander.MonitorBlockHandler.class)
    public String hello() {
        return "hello!"+":欢迎使用sentinel";
    }
    @GetMapping(value = "/correlation")
    public String correlation() {
        return "我是关联接口";
    }
}
